/* 共享样式 */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 响应式侧边栏 */
.sidebar-active {
    transform: translateX(0) !important;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 加载动画 */
.loading-spinner {
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 过渡效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 侧边栏文本动画 */
.sidebar-text {
    transition: opacity 0.2s ease-in-out;
}

/* 按钮悬停动画 */
.sidebar-toggle-btn {
    transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
    background-color: #f3f4f6;
    transform: scale(1.05);
}

/* 菜单图标动画 */
.menu-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

/* 自定义滚动行为 */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* 截断文本 */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 响应式图片 */
.responsive-img {
    max-width: 100%;
    height: auto;
}

/* 内容可见性优化 */
.content-auto {
    content-visibility: auto;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 4rem;
    right: 1rem;
    z-index: 50;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    transform: translateY(-20px);
    opacity: 0;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.success {
    background-color: #10b981;
    color: white;
}

.notification.error {
    background-color: #ef4444;
    color: white;
}

.notification.info {
    background-color: #3b82f6;
    color: white;
}

/* 帮助文档弹窗样式 */
#help-modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#help-modal-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#help-modal.opacity-100 {
    opacity: 1;
}

#help-modal-overlay.opacity-100 {
    opacity: 1;
}

/* 弹窗内容样式优化 */
#help-modal .max-h\[90vh\] {
    max-height: 90vh;
}

#help-modal ul, #help-modal ol {
    padding-left: 1.5rem;
}

#help-modal h4 {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

/* 用户中心下拉菜单样式 */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-dropdown-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.user-dropdown-button:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.user-dropdown-content {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.25rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    min-width: 160px;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.user-dropdown.open .user-dropdown-content {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    display: block !important;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #4b5563;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.user-dropdown-item:hover {
    background-color: #f3f4f6;
}

.user-dropdown-item:last-child {
    border-top: 1px solid #e5e7eb;
}